<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Interpolations - Three.js Docs</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<script src="../scripts/highlight.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
	<link type="text/css" rel="stylesheet" href="../styles/page.css">
</head>
<body>
	<h1 translate="no">Interpolations</h1>
		<section>
			<header>
			</header>
			<article>
				<div class="container-overview">
					<div class="description"><p>Interpolations contains spline and Bézier functions internally used by concrete curve classes.</p>
<p>Bezier Curves formulas obtained from: https://en.wikipedia.org/wiki/B%C3%A9zier_curve</p></div>
				</div>
				<h2 class="subsection-title">Methods</h2>
					<h3 class="name name-method" id="~CatmullRom" translate="no">.<a href="#~CatmullRom">CatmullRom</a><span class="signature">( t : <span class="param-type">number</span>, p0 : <span class="param-type">number</span>, p1 : <span class="param-type">number</span>, p2 : <span class="param-type">number</span>, p3 : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> <span class="type-signature">(inner) </span></h3>
					<div class="method">
						<div class="description">
							<p>Computes a point on a Catmull-Rom spline.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>t</strong>
									</td>
									<td class="description last">
										<p>The interpolation factor.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>p0</strong>
									</td>
									<td class="description last">
										<p>The first control point.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>p1</strong>
									</td>
									<td class="description last">
										<p>The second control point.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>p2</strong>
									</td>
									<td class="description last">
										<p>The third control point.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>p3</strong>
									</td>
									<td class="description last">
										<p>The fourth control point.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The calculated point on a Catmull-Rom spline.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="~CubicBezier" translate="no">.<a href="#~CubicBezier">CubicBezier</a><span class="signature">( t : <span class="param-type">number</span>, p0 : <span class="param-type">number</span>, p1 : <span class="param-type">number</span>, p2 : <span class="param-type">number</span>, p3 : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> <span class="type-signature">(inner) </span></h3>
					<div class="method">
						<div class="description">
							<p>Computes a point on a Cubic Bezier curve.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>t</strong>
									</td>
									<td class="description last">
										<p>The interpolation factor.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>p0</strong>
									</td>
									<td class="description last">
										<p>The first control point.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>p1</strong>
									</td>
									<td class="description last">
										<p>The second control point.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>p2</strong>
									</td>
									<td class="description last">
										<p>The third control point.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>p3</strong>
									</td>
									<td class="description last">
										<p>The fourth control point.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The calculated point on a Cubic Bezier curve.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="~QuadraticBezier" translate="no">.<a href="#~QuadraticBezier">QuadraticBezier</a><span class="signature">( t : <span class="param-type">number</span>, p0 : <span class="param-type">number</span>, p1 : <span class="param-type">number</span>, p2 : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> <span class="type-signature">(inner) </span></h3>
					<div class="method">
						<div class="description">
							<p>Computes a point on a Quadratic Bezier curve.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>t</strong>
									</td>
									<td class="description last">
										<p>The interpolation factor.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>p0</strong>
									</td>
									<td class="description last">
										<p>The first control point.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>p1</strong>
									</td>
									<td class="description last">
										<p>The second control point.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>p2</strong>
									</td>
									<td class="description last">
										<p>The third control point.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The calculated point on a Quadratic Bezier curve.</dt>
						</dl>
					</div>
				<h2 class="subsection-title">Source</h2>
				<p>
					<a href="https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js" translate="no" target="_blank" rel="noopener">src/extras/core/Interpolations.js</a>
				</p>
			</article>
		</section>
<script src="../scripts/linenumber.js"></script>
<script src="../scripts/page.js"></script>
</body>
</html>